<%@page import="uade.distribuidas.repo.dto.ProveedorDTO"%>
<%@page import="uade.distribuidas.repo.dto.ClienteDTO"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Editar Proveedor</title>
</head>
<body>
	<%
	ProveedorDTO p = (ProveedorDTO)request.getAttribute("proveedor");
	String id = null;
	if(p!=null){
		id = String.valueOf(p.getId());	
	}
	String successMsg = "";
	if(!String.valueOf(request.getAttribute("successMsg")).equals("") && request.getAttribute("successMsg")!=null){
		successMsg=String.valueOf(request.getAttribute("successMsg"));
	}
	
	%>
	<form action="ControladorProveedor?action=save" method="post">
	<table cellspacing="3" cellpadding="3" border="1" width="60%">	
	<input type="hidden" name="id" value="<%=id!=null?id:""%>">
	<tr>
		<td><b>CUIL:</b> 
	  <td><input type="text" name="cuil" value="<%=p!=null?p.getCuil():""%>"></td>
	</tr>
	<tr>
		<td><b>Razon Social:</b> 
	  <td><input type="text" name="razonSocial" value="<%=p!=null?p.getRazonSocial():""%>"></td>
	</tr>
	<tr>
		<td><b>Domicilio:</b> 
	  <td><input type="text" size="50" name="domicilio" value="<%=p!=null?p.getDomicilio():""%>"></td>
	</tr>
	<tr>
		<td><b>Telefono:</b> 
	  <td><input type="text" size="50" name="telefono" value="<%=p!=null?p.getTelefono():""%>"></td>
	</tr>
	<tr>
		<td colspan="1"><%  %><input type="submit" value="<%=p!=null?"Editar Proveedor":"Nuevo Proveedor"%>"></td>
		<td colspan="1">
		<strong style="color: green;">
		
		<%=successMsg%>
		
		</strong>
		</td>
	</tr>
	</table>
	</form>
</body>
</html>